home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Netware Super Library
/
Netware Super Library.iso
/
mis_util
/
dbfx
/
dbfx.doc
next >
Wrap
Text File
|
1991-01-11
|
24KB
|
651 lines
----
dBFX
----
This software is distributed on a shareware basis by
VISTON SYSTEMS, INC.
2217 Johnstown Road
Chesapeake, VA. 23322-2742
(804) 421-4345
----------------------------
THIS IS AN UNREGISTERED COPY
----------------------------
Although dBFX was originally created for the dBASE III and
dBASE III+ programmer, it has been successfully implemented in
dBASE IV, FoxBase, FoxPro, dBXL, dBFast, and Clipper
environments. The features it provides include:
o Light Bars o Sound Effects
o Screen Coloring o Menu Bars
o Music o Windows
o Directory-to-DBF Translation
o Programmable Function Keys
o Screen Mode Identification
o Global Search and Replace Utility
o Source Code Printing Utility
dBFX is offered as Shareware. The cost to register is
$25.00 per installation plus $2.00 shipping and handling for U.S.
orders (Virginia residents add $1.13 sales tax). Quantity
discounts are available for multiple installations. Included
with the dBFX diskette is a 40-page Programmer's Guide as well as
a Home Video Tracker system which effectively demonstrates many
of the capabilities provided by the dBFX utility package. And
for an additional $25.00 plus $3.00 shipping and handling for
U.S. orders (Virginia residents add $1.13 sales tax), printed
listings of the COBOL and fully-commented Assembler source code
for dBFX are available. Using these listings as a starting
point, the advanced programmer can modify existing routines or
create entirely new functions.
We are confident that dBFX will benefit your applications in
terms of ease of development, added functionality, and improved
user-friendliness of your finished product. We will gladly
forward your registered copy of dBFX, the Programmer's Guide, and
the Home Video Tracker upon receipt of your check or money order
for $27.00 plus tax, if applicable. If you would also like to
receive the dBFX source listings, please enclose an additional
$28.00 plus tax, if applicable. The software is provided on
5.25" diskettes, but 3.5" diskettes are available upon request at
no additional charge.
Any comments you may have will be greatly appreciated.
Watch for future releases from Viston!
dBFX
dBFX is a programmer's utility package for dBASE III/III
Plus and compatible languages such as Clipper, FoxBase, FoxPro,
etc. It provides many capabilities which dBASE alone does not.
The following is a list of dBFX components:
o FX.BIN, the dBFX callable binary file, allows the
programmer to call any of nine subroutines. These
subroutines provide light bars, sound effects, screen
coloring, directory-to-DBF translation, programmable
function keys, menu bars, screen mode identification, music,
and windows.
o FXFIND.EXE, the dBFX global search and replace utility,
allows the programmer to search through ASCII files to
locate, display, and, optionally, replace specified strings.
You may select multiple files to search by using "*" and "?"
as wildcards.
o FXLIST.EXE, the dBFX source code printing utility,
allows the programmer to print ASCII files with page
headers, line numbers, and user-specified spacing. You may
select multiple files for printing by using "*" and "?" as
wildcards.
o FXDIR.DBF, the dBFX directory file, contains a set of
directory entries, based on the most recent call to the
directory-to-DBF translation subroutine. This standard
database file, in conjunction with a call to FX.BIN, enables
the programmer to access directory data inside of a dBASE
application.
o FXKEYS.DBF, the dBFX function keys file, contains
function key translation data. The programmer can assign
FX.BIN's interpretation of function keys by updating this
standard database file.
o FXFUNCT.PRG, the dBFX function keys definition utility,
serves as a quick means of updating the FXKEYS.DBF. Because
it is a standard dBASE .PRG file, it may also be used as a
model for building your own function key access programs.
dBFX SYSTEM REQUIREMENTS
To use dBFX, you must have an IBM PC or compatible machine
with DOS version 3.0 or higher, at least 512K bytes of RAM and
dBASE III/III Plus or a compatible language. dBFX can be used
with a monochrome monitor; however, many of its features are more
effective when implemented in color.
INSTALLING dBFX
Your dBFX diskette contains the following files:
o FX.BIN - dBFX callable binary file.
o FXFIND.EXE - dBFX global search and replace utility.
o FXLIST.EXE - dBFX source code printing utility.
o FXDIR.DBF - dBFX directory file.
o FXKEYS.DBF - dBFX function keys file.
o FXFUNCT.PRG - dBFX function keys definition utility.
There are no hidden files or copy-protection gimmicks on
your dBFX diskette. You may install dBFX by copying the diskette
contents into one or more directories or by executing the dBFX
INSTALL.BAT file.
If you wish to install dBFX "manually," we recommend that
you distribute the files in the following manner:
o Place FX.BIN, FXDIR.DBF, and FXKEYS.DBF in each
directory where you intend to use them.
o Place FXFIND.EXE and FXLIST.EXE in a directory which is
included in your AUTOEXEC.BAT file's PATH list.
If you wish to use the dBFX INSTALL.BAT, you must determine
where you wish to place the two groups of files listed above.
Once you've done so, place the dBFX diskette in drive A and enter
the following at the DOS prompt:
A:INSTALL
From that point onward, INSTALL.BAT will prompt you through
the installation process. Note that you may only use INSTALL.BAT
if you are installing dBFX on a drive other than drive A.
USING FX.BIN
FX.BIN is a multi-purpose binary file for use in dBASE
III/III Plus and compatible programming applications. It
includes nine subroutines. The format of a call to FX is:
CALL FX WITH "XXXX-<parameter list>"
XXXX represents any of the nine subroutine identifiers and
<parameter list> represents subroutine-specific data. (See the
individual entries in this section for detailed descriptions of
the various parameter lists and calling rules.)
The nine subroutine identifiers are:
o BARS (light bar subroutine.)
o BELL (sound effect subroutine.)
o COLO (screen coloring subroutine.)
o DIRF (directory .DBF building subroutine.)
o KEYS (function key subroutine.)
o MENU (menu bar subroutine.)
o MODE (screen mode subroutine.)
o PLAY (music playing subroutine.)
o WIND (window subroutine.)
It is only necessary to load the FX.BIN file once during the
execution of an application. After you have loaded it, you may
call any of the nine subroutines repeatedly until you release it
from use. The statements for loading and releasing FX.BIN are
"LOAD FX" and "RELEASE MODULE FX".
CAUTION: FX.BIN's interpretation of parameters is positional.
The spacing which you use is critical in FX.BIN's ability to
properly translate a parameter list. FX.BIN does not validate
parameter lists. Be sure that your parameter spacing and values
are valid. You should always test your application software
thoroughly in a test environment before implementation. A bad
call to FX.BIN could cause your system to halt.
NOTE: When using FX.BIN in some environments, you may need to
pad your parameter lists with trailing spaces. (BARS, KEYS, and
MENU are the subroutines most likely to be affected because they
return values to the calling program.)
BARS
The BARS subroutine produces a single column of fixed-
length light bars. It requires screen coordinates to establish
boundaries. In order to access the returned value, you must call
the BARS subroutine using a memory variable rather than using an
'immediate mode' literal.
Calling sequence:
<memvar> = "BARS-@ tt,ll TO bb,rr"
CALL FX WITH <memvar>
tt = two-digit top line number.
ll = two-digit left column number.
bb = two-digit bottom line number.
rr = two-digit right column number.
Example:
MEM_BARS = "BARS-@ 05,15 TO 20,60"
CALL FX WITH MEM_BARS
When the user presses a valid key, the BARS subroutine
returns one of the following in <memvar>:
o "F-" + an entry from the FXKEY.DBF file if user presses
a defined function key. If the corresponding FXKEYS.DBF
entry is blank, it is considered undefined and the keystroke
is invalid.
o "U-" + the current light bar entry if user presses the
page-up key.
o "D-" + the current light bar entry if user presses the
page-down key.
o "E-" + the current light bar entry if user presses the
escape key.
o "N-" + the selected entry if user places the light bar
over an entry and presses the return.
If the user presses an invalid key, the BARS subroutine will
generate an audible bell and await a valid keystroke.
To set up bar data, use the standard dBASE "@ .. SAY"
process. FX should be called after the screen is set up.
The following rules apply to screen setup:
o Data outside of the specified boundaries are ignored.
o The length of the light bar is determined by the left
and right column coordinates.
o Any vertical spacing is acceptable and vertical spacing
may vary throughout the specified area.
o The BARS subroutine will only allow positioning of the
light bar via the cursor-up and cursor-down arrows.
o Any color combination may be used. Separate lines in
the specified area may vary in color. The BARS subroutine
uses the attribute byte of the current line's first
character to construct the attribute byte of the light bar.
It reverses foreground and background colors and maintains
the original blinking/intensity bits.
o Graphics characters are ignored. The BARS subroutine
treats them like spaces.
BELL
The BELL subroutine produces bells of five types and varying
durations.
Calling sequence:
CALL FX WITH "BELL-td"
t = type (0 through 4.)
d = duration (A through Z.)
Example:
CALL FX WITH "BELL-1G"
Bell type 0 alternates high and low frequencies.
Bell type 1 is an upward slide.
Bell type 2 is a downward slide.
Bell type 3 is a low-pitched buzz.
Bell type 4 is a high-pitched beep.
Note that the character of each of the bell types changes
dramatically with changes in duration. To get the real "feel"
for them, you should try each bell at various durations.
COLO
The COLO subroutine changes the color attributes of a
specified area of the screen without disturbing the screen data.
It requires screen coordinates to establish the boundaries of the
area to be colored. The programmer may specify up to ten color
attributes.
Calling sequence:
CALL FX WITH "COLO-@ tt,ll TO bb,rr-cccccccccc"
tt = two-digit top line number.
ll = two-digit left column number.
bb = two-digit bottom line number.
rr = two-digit right column number.
cccccccccc = up to ten color attributes.
Example:
CALL FX WITH "COLO-@ 08,10 TO 15,22-GR+/B"
The COLO subroutine alters attribute bytes for screen data
within the boundaries specified by calling screen coordinates.
It ignores all screen data, including graphics characters.
NOTE: For monochrome monitors, the following are the only valid
color attribute combinations:
W/N = normal.
N/W = inverse.
B = underlined.
X = blank (hidden.)
You may use "+" (high intensity) and "*" (blinking) on both
color and monochrome monitors.
DIRF
The DIRF subroutine builds the FXDIR.DBF directory file.
For each file which meets the specified search conditions, it
creates one .DBF record containing the file name. Any previous
data in FXDIR.DBF will be lost during the operation.
Calling sequence:
CALL FX WITH "DIRF-<path>"
Example:
CALL FX WITH "DIRF-C:\SAMPLE\*.DBF"
The path specified may use "*" and "?" as wild cards. The
directory specified need not be the current directory.
KEYS
The KEYS call accepts and translates a keystroke without
echoing it to the screen. To access the returned value, you must
call the KEYS subroutine using a memory variable rather than an
'immediate mode' literal.
Calling sequence:
<memvar> = "KEYS"
CALL FX WITH <memvar>
Example:
MEM_KEYS = "KEYS"
CALL FX WITH MEM_KEYS
When the user presses a key, the KEYS subroutine returns one
of the following in <memvar>:
o "F-" + an entry from the FXKEY.DBF file if user presses
a defined function key. If the corresponding FXKEYS.DBF
entry is blank, it is considered undefined and the keystroke
is treated as non-ASCII.
o User's printable ASCII character.
o "nn", where nn is one of the following:
a) the associated hexadecimal value of user's non-
printable ASCII character. ("1B" for [ESCAPE], etc.)
b) the associated hexadecimal scan code of user's
non-ASCII keystroke. ("4F" for [END], etc.)
MENU
The MENU subroutine performs the menu bar function. It
requires screen coordinates to establish menu boundaries. For
your application to access the returned value, your call must use
a memory variable rather than an 'immediate mode' literal.
Calling sequence:
<memvar> = "MENU-@ tt,ll TO bb,rr"
CALL FX WITH <memvar>
tt = two-digit top line number.
ll = two-digit left column number.
bb = two-digit bottom line number.
rr = two-digit right column number.
Example:
MEM_MENU = "MENU-@ 02,10 TO 21,70"
CALL FX WITH MEM_MENU
When the user presses a valid key, the MENU call returns one
of the following in <memvar>:
o "F-" + an entry from the FXKEYS.DBF file if user
presses a defined function key. If the corresponding
FXKEYS.DBF entry is blank, it is considered undefined and
the keystroke is invalid.
o "U-" + the current light bar entry if user presses the
page-up key.
o "D-" + the current light bar entry if user presses the
page-down key.
o "E-" + the current light bar entry if user presses the
escape key.
o "N-" + the selected entry if user places the light bar
over an entry and presses the return key or if user presses
a key representing the first alphanumeric character of a
menu entry.
NOTE: If user enters a lower case letter, it will be translated
into upper case for the search.
If user presses an invalid key, the MENU subroutine will
generate an audible bell and await a valid keystroke.
To build a menu, use the standard dBASE "@ .. SAY" process.
FX should be called after the menu is built.
The following rules apply to menu construction:
o The menu must contain at least one entry.
o Data outside of the specified boundaries are ignored.
o Any number of entries may be included so long as there
are at least two spaces between entries on the same line.
o A single entry may not contain double spacing. The
MENU subroutine regards double spaces as entry delimiters.
o Any vertical spacing is acceptable and vertical spacing
may vary throughout the menu.
o The MENU subroutine will find the first entry whose
first character matches the user's keystroke. If more than
one entry begins with the same character, subsequent entries
can only be found using the cursor control arrow keys.
o Entries need not be aligned in columns. Pressing the
up and down arrows causes the MENU subroutine to find any
entry which has any character directly above or below the
current entry. If two or more entries have characters which
qualify, the leftmost entry on the nearest line is selected.
o Any color combination may be used. Separate entries in
a menu may vary in color. The MENU subroutine uses the
attribute byte of the current entry's first character to
construct the attribute bytes of the light bar. It reverses
foreground and background colors and maintains the original
blinking/intensity bits.
o Graphics characters are ignored. The MENU subroutine
treats them like spaces.
MODE
The MODE call returns "C" for color mode or "M" for
monochrome. To access the returned value, you must use a memory
variable rather than an 'immediate mode' literal.
Calling sequence:
<memvar> = "MODE"
CALL FX WITH <memvar>
Example:
MEM_MODE = "MODE"
CALL FX WITH MEM_MODE
PLAY
The PLAY subroutine plays music.
Calling sequence:
CALL FX WITH "PLAY-nsod-nsod... ...-ZZ"
n = note name (A through G.)
s = sign (N = natural. F = flat. S = sharp.)
o = octave (1 through 5.)
d = duration (1 through 9.)
For rests, substitute "XX0" for note, sign, and octave.
Terminate the entry with "ZZ".
Example:
CALL FX WITH "PLAY-EF34-DN34-CN34-XX04-EF34-ZZ"
The following rules apply when constructing PLAY parameters:
o Note names and signs must be upper case.
o The entry may be up to 128 characters long.
o Whenever "ZZ" is encountered instead of note name and
sign, PLAY subroutine processing ceases.
WIND
The WIND subroutine manages windows. There are six types of
WIND subroutine calls:
Calling sequence:
1. CALL FX WITH "WIND-Sn-@ tt,ll TO bb,rr-cccccccccc"
2. CALL FX WITH "WIND-On"
3. CALL FX WITH "WIND-Cn"
4. CALL FX WITH "WIND-Un" or "WIND-Un-uu"
5. CALL FX WITH "WIND-Dn" or "WIND-Dn-dd"
6. CALL FX WITH "WIND-Rn"
n = window number.
uu = upward scroll factor (spacing.)
dd = downward scroll factor (spacing.)
tt = two-digit top line number.
ll = two-digit left column number.
bb = two-digit bottom line number.
rr = two-digit right column number.
cccccccccc = up to ten color attributes.
Examples:
1. CALL FX WITH "WIND-S1-@ 10,10 TO 22,60-W*/B"
2. CALL FX WITH "WIND-O1"
3. CALL FX WITH "WIND-C1"
4. CALL FX WITH "WIND-U1" or CALL FX WITH "WIND-U1-02"
5. CALL FX WITH "WIND-D1" or CALL FX WITH "WIND-D1-02"
6. CALL FX WITH "WIND-R1"
The following rules apply to WIND subroutine calls:
o There are five windows available. They are numbered 0
through 4. (If more than five windows are needed, these may
be added by copying FX.BIN to one or more additional .BIN
file names and loading them as well.)
o Call 1 is the SET call. In the SET call, you must set
the window's screen coordinates. After the coordinates, you
may specify up to ten color attributes for the window. The
SET call can be executed between the other window calls to
modify the window's dimensions and screen attributes.
o Call 2 is the OPEN call. When the specified window is
opened via this call, the current screen image is placed in
the corresponding FX screen image buffer and the window is
opened.
o Call 3 is the CLOSE call. When the specified window is
closed via this call, the screen image buffer is restored.
o Call 4 is the SCROLL UP call. This call causes data in
the specified window to scroll up. You may, optionally,
include a 2-digit value indicating the number of lines to scroll (i.e., the spacing value). The default is 1 line.
o Call 5 is the SCROLL DOWN call. This call causes data
in the specified window to scroll down. You may,
optionally, include a 2-digit value indicating the number of
lines to scroll (i.e., the spacing value). The default is 1
line.
o Call 6 is the REFRESH call. This call places the
current screen contents in the corresponding FX image
buffer, overlaying the image from any previous open/refresh
call.
NOTE: For monochrome monitors, the following are the only valid
color attribute combinations:
W/N = normal.
N/W = inverse.
B = underlined.
X = blank (hidden.)
You may use "+" (high intensity) and "*" (blinking) on both
color and monochrome monitors.
USING FXFIND.EXE AND FXLIST.EXE
FXFIND.EXE is a command-level utility which performs global
search and replace operations on ASCII text files. It was
written to search or modify .PRG files, but it can be used on any
line sequential ASCII text file with 140 or fewer characters per
record.
Syntax:
FXFIND <path> /F"string1" /R"string2" /C
/F = "Find." [Required]
/R = "Replace." [Optional]
/C = "Ignore Upper/Lower Case." [Optional]
If strings include double quotes, substitute single
quotes as delimiters.
Path may include "*" and "?" as wild cards.
Path need not be in the current directory.
Example:
FXFIND C:\SAMPLE\*.PRG /F"do while" /R"DO WHILE"
CAUTION: I strongly recommend that you back up your files before
making a global change to multiple files, so you can readily
recover from any unforeseen and undesirable impact of the change.
FXLIST.EXE is a command-level utility which prints ASCII text
files. It inserts page headings and line numbers in the
printouts. It was written for use in printing .PRG files, but it
can be used to print any line sequential ASCII text file with 140
or fewer characters per record.
Syntax:
FXLIST <path> /Sn
/S = Spacing. (n = 1 through 4.) [Optional.]
Path may include "*" and "?" as wild cards.
Path need not be in the current directory.
Example:
FXLIST C:\SAMPLE\*.PRG /S2